<template>
<div class="first">
  <router-link tag="div" class="every" :to="{name:'detail',params:{item}}" v-for="(item, index) in list" :key="index"><img :src="'https://cdn.bestseller.com.cn'+item.picurls[0]" alt="qi">
  <p>{{item.goodsName}}</p>
  <p>price：{{item.price}}</p>
  </router-link>
</div>
</template>
<script>
import requst from '../../ajaxservice'
export default {
  name: 'first',
  created(){
  this.requst.get()
    .then(res=>{
      this.list=res.filter(item=>{
      return item.picurls[0]!== undefined 
      })
    })
  },
  data(){
    return {list:[]}
  }
}
</script>

<style>

</style>
